<%--
  Created by IntelliJ IDEA.
  User: ZTK
  Date: 2025/6/13
  Time: 23:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>二手平台 - 注册</title>
    <link href="${pageContext.request.contextPath}/resources/css/bootstrap.min.css" rel="stylesheet">
    <style>
        :root {
            --primary-color: #ff5000;
        }

        body {
            background-color: #f5f5f5;
            min-height: 100vh;
            display: flex;
            align-items: center;
        }

        .register-container {
            max-width: 500px;
            margin: 0 auto;
            padding: 30px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .logo {
            text-align: center;
            margin-bottom: 30px;
        }

        .logo h2 {
            color: var(--primary-color);
            font-weight: bold;
        }

        .form-control:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 0.2rem rgba(255, 80, 0, 0.25);
        }

        .btn-primary {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        .btn-primary:hover {
            background-color: #e04800;
            border-color: #e04800;
        }

        .form-text {
            color: #666;
            font-size: 0.85rem;
        }
    </style>
</head>
<body>
<div class="container">
    <div class="register-container">
        <div class="logo">
            <h2>注册二手平台账号</h2>
        </div>
        <form action="/user/register" method="post">
            <div class="mb-3">
                <label for="username" class="form-label">用户名</label>
                <input type="text" class="form-control" id="username" name="username" required>
                <div class="form-text">请使用字母、数字或下划线，长度4-20个字符</div>
            </div>
            <div class="mb-3">
                <label for="password" class="form-label">密码</label>
                <input type="password" class="form-control" id="password" name="password" required>
                <div class="form-text">密码长度至少6位</div>
            </div>
            <div class="mb-3">
                <label for="confirmPassword" class="form-label">确认密码</label>
                <input type="password" class="form-control" id="confirmPassword" name="confirmPassword" required>
            </div>
            <div class="mb-3">
                <label for="email" class="form-label">邮箱</label>
                <input type="email" class="form-control" id="email" name="email" required>
                <div class="form-text">用于找回密码和接收通知</div>
            </div>
            <div class="mb-3 form-check">
                <input type="checkbox" class="form-check-input" id="agree" required>
                <label class="form-check-label" for="agree">我已阅读并同意<a href="#">《用户协议》</a>和<a href="#">《隐私政策》</a></label>
            </div>
            <button type="submit" class="btn btn-primary w-100">立即注册</button>
        </form>
        <div class="mt-3 text-center">
            <a href="/user/login">已有账号？立即登录</a>
        </div>
    </div>
</div>
</body>
</html>